/**
 * @date 2:47:44 PM
 * EducationPathDaoImpl.java
 * Administrator
 * TODO
 */
package com.qs.education.bean.dao.impl;

import java.util.List;

import javax.persistence.Query;

import org.springframework.stereotype.Repository;

import com.qs.education.bean.dao.IEducationPathDao;
import com.qs.education.bean.entity.EducationPath;

/**
 * @class EducationPathDaoImpl
 * @author Brooks
 * @description 
 * @date Oct 24, 2018
 */
@Repository
public class EducationPathDaoImpl extends BaseDaoImpl<EducationPath> implements IEducationPathDao {

	/**
	 * @description 得到访问api的路径
	 * @user Brooks
	 * @date Oct 17, 2018
	 * @return EducationAdmin
	 */
	public EducationPath getEducationPath() {
		String jql="Select ep from EducationPath ep";
		Query query = this.em.createQuery(jql);
		@SuppressWarnings("unchecked")
		List<EducationPath> list = query.getResultList();
		if(list != null && list.size()>0){
			return list.get(0);
		} else {
			return null;
		}
	}

}
